import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Register from '@/components/Register'
import Home from '@/components/Home'
import Index from '@/components/client/Index'
import GoodDetails from '@/components/client/GoodDetails'
import ShoppingCart from '@/components/client/ShoppingCart'
import MyOrder from '@/components/client/MyOrder'

Vue.use(Router)

export default new Router({
  mode: 'history',
  // base: '/dist/',
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Index
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
    },
    {
      path: '/login',
      name: '登录',
      component: Login
    },
    {
      path: '/register',
      name: '注册',
      component: Register
    },
    {
      path: '/index',
      name: '首页',
      component: Index
    },
    {
      path: '/details',
      name: '商品详情',
      component: GoodDetails
    },
    {
      path: '/shoppingCart',
      name: '购物车',
      component: ShoppingCart
    },
    {
      path: '/myOrder',
      name: '我的订单',
      component: MyOrder
    }
    // {path:'*',redirect: '/login'},
  ]
})
